<template>
	<!-- 收益明细 -->
	<view>
		<view class="list" v-if="list.length">
			<view v-for="(item,index) in list" :key="index" class="bg-white">
				<view v-if="item.type == 1">订单编号：{{item.order_no}}</view>
				<view v-else>提现方式：{{item.withdraw_method==1?'微信':'银行卡'}}</view>
				<view v-if="item.type == 1">收入：￥{{item.income_amount}}</view>
				<view v-else>金额：￥{{item.payout_amount}}</view>
				<view class="">时间：{{item.created_at}}</view>
			</view>
		</view>
		<nodata v-else></nodata>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list:[]
			};
		},
		onLoad() {
			this.$api.credit_records().then(res=>{
				console.log(res);
				this.list = res.list
			})
		}
	}
</script>

<style lang="scss">
.list{
	.bg-white{
		padding: 19rpx 26rpx;
		width: 730rpx;
		height: 184rpx;
		margin: 10rpx auto;
		background: #FFFFFF;
		border-radius: 14rpx;
		view{
			height: 40rpx;
			color: #666666;
			margin: 13rpx 0;
			font-size: 28rpx;
		}
	}
}
</style>
